Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APS updates #2528

Merged
merged 1 commit into from
Jan 7, 2025
Merged

APS updates #2528

merged 1 commit into from
Jan 7, 2025

Conversation

djmitche
Copy link
Collaborator

These are some minor updates from walking through the session myself.

  • Add some context to the entry.S slide, which is otherwise a bit terrifying for someone who does not speak ARM assembly.
  • Include a simple, fake example of MMIO.
  • Add a "Using It" section to the minimal UART segment, parallel to the better UART
  • Better explanation of the unwrap calls in the logging example. Unwrap is never "unsafe", so remove that word.
  • Allow dead code in some .rs files.
  • Remove redundant warning about use of memory before MMU setup.
  • Rephase text about buddy-system
  • Fix lint warning in spin slide.

@@ -8,6 +8,10 @@ Before we can start running Rust code, we need to do some initialisation.

<details>

This code is in `src/bare-metal/aps/examples/entry.S`. It's not necessary to
understand this in detail -- the takeaway is that typically some low-level setup
is needed to meet Rust's expectations of the system.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I'm teaching I usually walk through the initialisation here, and talk about why cache coherency issues are a problem, because that is a common mistake I've seen. If people are used to doing similar things in C then it's pretty much the same, but if they're not then I think it's important to understand.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have a hard time doing that! For a student not familiar with assembly (or at least ARM assembly), what is the takeaway lesson here?

Is the cache coherency problem the one mentioned elsewhere in the speaker notes, where a VM not using an MMU might have coherency issues with a host that is using the MMU?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy New Year folks!

cache coherency issues are a problem

Okay, I don't think I did that in my last class, sorry! I think it would be good to expand the slides/notes with this material as well if it's important.

Cc @hurryabit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, exactly.

src/bare-metal/aps/mmio.md Outdated Show resolved Hide resolved
src/bare-metal/aps/uart/using.md Outdated Show resolved Hide resolved
@djmitche djmitche requested a review from qwandor December 28, 2024 21:50
@djmitche
Copy link
Collaborator Author

djmitche commented Jan 2, 2025

The CI failures here are

error: binary `mdbook` already exists in destination

I will rebase in hopes that fixes it..

src/bare-metal/aps/mmio.md Outdated Show resolved Hide resolved
@djmitche djmitche enabled auto-merge (squash) January 7, 2025 17:19
@djmitche djmitche requested a review from qwandor January 7, 2025 17:19
@djmitche djmitche force-pushed the aps-updates branch 2 times, most recently from 4e14437 to 23fd0e6 Compare January 7, 2025 18:48
These are some minor updates from walking through the session myself.

 * Add some context to the `entry.S` slide, which is otherwise a bit
   terrifying for someone who does not speak ARM assembly.
 * Include a simple, fake example of MMIO.
 * Add a "Using It" section to the minimal UART segment, parallel to the
   better UART
 * Better explanation of the `unwrap` calls in the logging example.
   Unwrap is never "unsafe", so remove that word.
 * Allow dead code in some `.rs` files.
 * Remove redundant warning about use of memory before MMU setup.
 * Rephase text about buddy-system
 * Fix lint warning in spin slide.
@djmitche djmitche merged commit c04d286 into google:main Jan 7, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants